function x = get_exo_param_by_name(pname, M_)
% function x = get_param_by_name(pname)
% returns the value of a parameter identified by its name
%  
% INPUTS:
%   pname:  parameter name
%
% OUTPUTS
%   x:      parameter value
%
% SPECIAL REQUIREMENTS
%   none
% NOTE: IMPLIES UNCORRELATED SHOCKS!!!


i = strmatch(pname,M_.exo_names,'exact');

if isempty(i)
    error(sprintf('Can''t find parameter %s', pname))
end

x = M_.Sigma_e(i,i);
